﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;

namespace HTAProDataImporter.Transport
{
    public class ICONTransport : BaseEntityTransport
    {
        public override string CommandText
        {
            get { return "select * from tblIcon"; }
        }

        public override void InstanceFromReader(OleDbDataReader DR)
        {
            int icon;
            if (!Int32.TryParse(DR["ICON"].ToString(), out icon))
                Warnings.Add(string.Format("Unable to parse ICON number {0} for pkIconID {1}", DR["ICON"], DR["pkIconID"]));
            else
                DataStore.ICON.Add(DR["pkIconID"].ToString(), icon);

        }
    }
}
